<?php

class addressInfo {

    /**
     * @access public
     * @var string
     */
    public $address1;

    /**
     * @access public
     * @var string
     */
    public $address2;

    /**
     * @access public
     * @var string
     */
    public $address3;

    /**
     * @access public
     * @var string
     */
    public $city;

    /**
     * @access public
     * @var string
     */
    public $stateProvinceCode;

    /**
     * @access public
     * @var string
     */
    public $countryCode;

    /**
     * @access public
     * @var string
     */
    public $postalCode;

    public function GetRestResponse(){
        $args = get_object_vars($this);
        $result = "";
        foreach ($args as $key => $value) {
            if($value != NULL || $value != "")
            $result .= "&".$key. "=" . $value;
        }
        return $result;
    }

}